
<ul class="pstgms lstli" id="hotGame"></ul>
<!-- Declare a JsRender template, in a script block: -->
<script id="gameT" type="text/x-jsrender">
{{for list}}
    <li>
        <article class="pstcnt bgco1 rnd5">
          <figure class="rnd5">
            <a href="game.html?id={{:Id}}"
              ><img
                src="{{:cover}}"
                data-src="{{:cover}}"
                width="60"
                height="60"
                class="widgetimage"
                alt="{{:name}}"
              /><noscript
                ><img
                  src="/images/defaultimg.png"
                  data-src="{{:cover}}"
                  width="60"
                  height="60"
                  class="widgetimage"
                  alt="{{:name}}" /></noscript
              ><span class="iconb-game" title="{{:name}}"
                ><span>Play</span></span
              ></a>
          </figure>
        </article>
      </li>
  {{/for}}
</script>

<script>
  $.ajax({
    url:
      "https://app.nocodb.com/api/v2/tables/mg01furv08tboqh/records?viewId=vwkcjs6aeek51qs1&limit=6&shuffle=1&offset=0&where=(tag,anyof,Hot)",
    type: "GET",
    dataType: "json",
    headers: {
      "xc-token": "dePwLQ88UMbt4O9ndpBSQ-6RUC_nIhhpPea_0kTR",
    },
    contentType: "application/json; charset=utf-8",
    success: function (gameData) {
      // item Template
      let gameTmpl = $.templates("#gameT");

      let gameHtml = gameTmpl.render(gameData);
      $("#hotGame").html(gameHtml);
    },
    error: function (error) {
      console.error(error);
    },
  });
</script>
